package com.hsgene.basic.exception;

import com.hsgene.common.util.exception.ErrorCode;

/**
 * 基础模块错误码定义
 *
 * @author wangbing
 * @version 1.0, 2018/8/28
 */
public enum BasicErrorCode implements ErrorCode {

    PARENT_PRODUCT_CATALOGUE_NOT_EXISTED(19001, "Error_Basic_Parent_Product_Catalogue_Not_Existed", "父级产品目录信息不存在"),
    PRODUCT_CATALOGUE_NOT_EXISTED(19002, "Error_Basic_Product_Catalogue_Not_Existed", "产品目录信息不存在"),
    PRODUCT_CATALOGUE_EXISTED(19003, "Error_Basic_Product_Catalogue_Existed", "产品目录信息已存在"),
    PRODUCT_CATALOGUE_MODIFY_NOT_SUPPORTED(19005, "Error_Basic_Product_Catalogue_Modify_Not_Supported", "固定产品目录信息，不支持更改"),
    PRODUCT_CATALOGUE_EXISTED_GOODS_FOR_DELETE(19006, "Error_Basic_Product_Catalogue_Existed_Goods_For_Delete", "目录下还存在商品，不允许删除");

    private final int code;

    private final String message;

    private final String description;

    BasicErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
